export default function nativeLogin(userName, password, type) {
  const sys = localStorage.getItem('sys')
  try {
    if (sys === 'Android') {
      window.AndroidWebView.toLogin(userName, password, type)
    } else {
      window.webkit.messageHandlers.toLogin.postMessage({ userName: userName, password: password, type: type })
    }
  } catch (error) {
    console.log(error)
  }
}
